//
//  TZYFirstDebrisViewController.m
//  Moment
//
//  Created by dllo on 15/12/29.
//  Copyright © 2015年 片刻. All rights reserved.
//

#import "TZYFirstDebrisViewController.h"

@interface TZYFirstDebrisViewController ()

@property (nonatomic, strong) TZYDebrisTableViewController *tableViewController;

@end

@implementation TZYFirstDebrisViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.headNameLabel.text = @"碎片";
   
    UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 25)];
    //aView.backgroundColor = [UIColor orangeColor];
    UIImageView *rightImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 25, 25)];
    rightImageView.image = [UIImage imageNamed:@"suipian.png"];
    //iconfont-pengyouwang
    rightImageView.userInteractionEnabled = YES;
    [rightView addSubview:rightImageView];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightView];
    self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
    
    UITapGestureRecognizer *tapGR1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGR1:)];
    rightImageView.userInteractionEnabled = YES;
    [rightImageView addGestureRecognizer:tapGR1];
    
    
    
    
    self.tableViewController = [[TZYDebrisTableViewController alloc] init];
    [self addChildViewController:self.tableViewController];
    [self.view addSubview:self.tableViewController.view];
    self.tableViewController.view.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
    
    
    
}

- (void)tapGR1:(UIGestureRecognizer *)sender
{
    TZYDebrisViewController *debrisVC = [[TZYDebrisViewController alloc] init];
    [self.navigationController pushViewController:debrisVC animated:YES];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
